{% extends 'layout/body.html' %}
{% block title %}
    新增学生
{% endblock %}
{% block content %}
    <div class="row mt-2">
        <div class="col-6 offset-3">
            <form method="POST" action="{{ url_for('student.save') }}">
                <div class="form-group form-row">
                    <div class="col-4 text-right col-form-label">
                        姓名：
                    </div>
                    <div class="col-8">
                        <input required style="width: 12em" type="text" name="name" class="form-control"/>
                    </div>
                </div>
                <div class="form-group form-row">
                    <div class="col-4 text-right col-form-label">
                        性别：
                    </div>
                    <div class="col-8">
                        <select name="sex" style="width: 12em" class="form-control">
                            <option value="0">男</option>
                            <option value="1">女</option>
                        </select>
                    </div>
                </div>
                <div class="form-group form-row">
                    <div class="col-4 text-right col-form-label">
                        出生日期：
                    </div>
                    <div class="col-8">
                        <input required style="width: 12em" type="date" name="birthday" class="form-control"/>
                    </div>
                </div>
                <div class="form-group form-row">
                    <div class="col-4 text-right col-form-label">
                        用户名(学号)：
                    </div>
                    <div class="col-8">
                        <input required style="width: 12em" type="text" name="username" class="form-control"/>
                    </div>
                </div>
                <div class="form-group form-row">
                    <div class="col-4 text-right col-form-label">
                        班级：
                    </div>
                    <div class="col-8">
                        <select required name="clazz_id" class="form-control" style="width: 12em;">
                            {% for clazz in clazzes %}
                                <option value="{{ clazz.id }}">{{ clazz.name }}</option>
                            {% endfor %}
                        </select>
                    </div>
                </div>
                <div class="form-group form-row">
                    <div class="col-8 offset-4">
                        <button class="btn btn-primary"><i class="bi bi-check-square"></i>保存</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
{% endblock %}
